// 一眼动态规划，每次从前面最便宜的站点进行多买
// 同时要记得记录剩余的公里数
// 不开long long 见祖宗呜呜
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long LL;
const int N = 100010;
int n, d;
int a[N], v[N];
LL w[N], last[N];

int get_up(int x)
{
    if(x <= 0) return 0;
    return (x + d - 1) / d;
}


int main()
{
    cin >> n >> d;
    for(int i = 2; i <= n; ++i) cin >> v[i];
    for(int i = 1; i <= n; ++i) cin >> a[i];
    int minv = a[1];
    for(int i = 2; i <= n; ++i)
    {
        int next = get_up(v[i] - last[i - 1]);
        w[i] = w[i - 1] + next * minv;
        last[i] = next * d + last[i - 1] - v[i];
        minv = min(minv, a[i]);
        
    }
    cout << w[n] << endl;
    return 0;
}